package com.tpp.controller;

import com.tpp.pojo.Order;
import com.tpp.pojo.baseVo.BaseResult;
import com.tpp.service.SeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RequestMapping("/seat")
@RestController
//@CrossOrigin
public class SeatController {
    @Autowired
    SeatService seatService;

    @RequestMapping("/addSeat")
    public BaseResult addSeat(@RequestBody Map map,String id){
      return   seatService.addSeat(map,id);
    }
    @RequestMapping("/findAll")
    public BaseResult findAll(String id){return seatService.findAll(id);}
    @RequestMapping("/order")
    public BaseResult order(@RequestBody Order order){
        return seatService.addOrder(order);
    }
}
